package com.fuli.app.dao;

import com.fuli.app.dto.query.WorkQueryDTO;
import com.fuli.app.entity.Work;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkDao {

    Integer insert(Work po);

    Work get(String id);

    Integer delete(@Param("id") String id, @Param("updateId") String updateId);

    Integer batchDelete(@Param("idsList") List<String> ids, @Param("updateId") String userId);

    int getCountByQuery(WorkQueryDTO queryDTO);

    List<Work> listByQueryDTO(WorkQueryDTO queryDTO);

    Integer deal(@Param("id") String id, @Param("updateId") String updateId);

    Integer batchDeal(@Param("idsList") List<String> ids, @Param("updateId") String updateId);

    Integer grade(Work po);

    List<Work> getByCurriculumId(@Param("curriculumId") String curriculumId);

    List<Work> getByExerciseId(@Param("exerciseId") String exerciseId);
}
